package com.jiahao.material.utils;


import com.jiahao.material.entity.Result;

public class ResultUtil {

    public static Result success(String msg){
        Result result = new Result();
        result.setCode("200");
        result.setMessage(msg);
        return result;
    }

    public static Result fail(String msg){
        Result result = new Result();
        result.setCode("400");
        result.setMessage(msg);
        return result;
    }

    public static Result noAuthc(String msg){
        Result result = new Result();
        result.setCode("403");
        result.setMessage(msg);
        return result;
    }

    public static Result success(String msg,Object a){
        Result result = new Result();
        result.setCode("200");
        result.setMessage(msg);
        result.setData(a);
        return result;
    }
}
